<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .container {
            width: 1220px;
            margin: 0 auto;
        }
        .box {
            box-sizing: border-box;/*盒模型设置为怪异(IE)盒模型 */
            margin: 10px;
            border: 1px solid #000;
            padding: 5px;
            display: inline-block;/* 天坑 有bug*/
            width: 568px;
            height: 100px;
            background-color: green;
        }
        .box:nth-child(2) {
            background: yellow;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box">1</div><div class="box">2</div>
    </div>
</body>
</html>